package com.yingside.net.chat1;

import java.io.IOException;
import java.io.PrintWriter;
import java.net.Socket;

public class Client {
    public static void main(String[] args) {
        Socket s = null;
        try {
            s = new Socket("192.168.28.131",8888);

            PrintWriter out = new PrintWriter(s.getOutputStream(),true);

            out.println("hello,你好");

        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                if(s != null){
                    s.close();
                }

            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }
}
